import { lazy } from "react";
import { Navigate } from 'react-router-dom'
import { FriendsO, HomeO, Search, SettingO } from '@react-vant/icons'
const Detail=lazy(()=>import('../promise/Detail'))
const Home=lazy(()=>import('../promise/Home'))
const Login = lazy(() => import('../promise/Login'))

export const tabbars=[
    {
        path:'/home',
        element: <Home />,
        title:'首页',
        icon:<FriendsO/>
    }
]
export const routes=[
    {
        path:'/',
        element: <Detail></Detail>,
        children:[
            ...tabbars,
            {
                path: '/',
                element:<Navigate to='/home'></Navigate>
            }
        ]
    },
    {
        path:'/login',
        element: <Login />,
       
    }
]